#ifndef FRAMELESSWINDOW_H
#define FRAMELESSWINDOW_H

#include <QWidget>
#include <QMouseEvent>
#include <QApplication>

namespace Ui {
class FramelessWindow;
}

class FramelessWindow : public QWidget
{
    Q_OBJECT

public:
    explicit FramelessWindow(QWidget *parent = nullptr);
    ~FramelessWindow();

protected:
    void mousePressEvent(QMouseEvent *event) override;
    void mouseMoveEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;

private slots:
    void on_btn_close_clicked();

    void on_btn_min_clicked();

private:
    Ui::FramelessWindow *ui;
    bool isDragging;
    QPoint dragPosition;
};

#endif // FRAMELESSWINDOW_H

